﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace RushTracker.Core.Util
{
    public static class SHA256HashGenerator
    {
        public static string Generate(string val, string salt)
        {
            byte[] data = Encoding.Default.GetBytes(val + salt);

            SHA256Managed sha256 = new SHA256Managed();
            byte[] result = sha256.ComputeHash(data);

            return Convert.ToBase64String(result) ;
        }
    }
}
